package com.xywy.bloodandroid.act;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.xywy.bloodandroid.R;
import com.xywy.bloodandroid.base.BaseActivity;

/**
 * 设置
 */
public class SettingActivity extends BaseActivity {

	private TextView middle_title;
	private RelativeLayout left_img;
	private LinearLayout ll_account;
	private LinearLayout ll_clear_cache;
	private LinearLayout ll_about_app;

	@Override
	protected void initView(Bundle savedInstanceState) {
		setContentView(R.layout.activity_setting);

		middle_title = (TextView) findViewById(R.id.middle_title);
		middle_title.setText("设置");
		left_img = (RelativeLayout) findViewById(R.id.left_img);
		ll_account = (LinearLayout) findViewById(R.id.ll_account);
		ll_clear_cache = (LinearLayout) findViewById(R.id.ll_clear_cache);
		ll_about_app = (LinearLayout) findViewById(R.id.ll_about_app);

	}

	@Override
	protected void initListener() {
		left_img.setOnClickListener(this);
		ll_account.setOnClickListener(this);
		ll_clear_cache.setOnClickListener(this);
		ll_about_app.setOnClickListener(this);
	}

	@Override
	protected void initData() {

	}

	@Override
	public void onClick(View v) {
		super.onClick(v);
		switch (v.getId()) {
		case R.id.left_img:
			SettingActivity.this.finish();
			break;
		case R.id.ll_account:
			enterActivity(AccountActivity.class);
			break;
		case R.id.ll_clear_cache:
			enterActivity(ClearCacheActivity.class);
			break;
		case R.id.ll_about_app:
			enterActivity(AboutAcitivty.class);
			break;
		default:
			break;
		}
	}

}
